1. Field of the Invention
The present invention relates to an image signal decoding device for decoding image signals transmitted or recorded after compression and, more particularly, to speeding up of and improvements in the efficiency of a process of removing block distortion in such a device.
2. Description of the Related Art
In general, the quantity of data becomes very large when recording image signals produced by a solid-state image pickup device, such as a charge-coupled device, on a recording medium such as a memory card, a magnetic disk or magnetic tape as digital data. In order to record such data within a limited range of storage capacity, it is usually required to perform some high-efficiency compression on image signal data produced by the image pickup device.
As a high-efficiency method of compression of image data, an orthogonal transform coding method is well known. An example of such a method will be described with reference to FIG. 24.
First, image data f is input from a solid-state image pickup device (401) and then the image data is divided into blocks each of a predetermined size to obtain a value fb (402). The value fb is converted to a value F by performing two-dimensional discrete cosine transform (DCT) as orthogonal transform on each of the blocks (403). Next, linear quantization is performed on each of frequency components (404). As variable-length coding, huffman coding is performed on the quantized value Fq (405). The results of this coding are transmitted or recorded as compressed data C. The width of the linear quantization is determined by preparing a quantizing matrix representing relative quantizing characteristics taking visual characteristics for each frequency component into consideration and multiplying the matrix by a constant.
When recovering image data from the compressed data C, on the other hand, the quantized value Fq of the transform coefficient is obtained by decoding the variable-length code C (406). However, it is impossible to obtain the true value F prior to the quantization from Fq. The result F' obtained by inverse quantization will contain an error (407). Thus, inverse discrete cosine transform (IDCT) is performed on the value F' (408) and image data f' obtained by inverse-blocking the result fb' of the IDCT will also contain an error (409). The quality of the reproduced image f' output from the image reproducing apparatus will be deteriorated (410). That is to say, the error due to the inverse quantization, what is referred to as quantization error, results in the deterioration of the quality of the reproduced image f'.
The above operations will be described more specifically with reference to FIGS. 25A and 25B. First, as shown in FIG. 25A, a frame of image data is divided into blocks each of a predetermined size (blocks A, B, C, etc., each consisting of, for example, 8.times.8 pixels). As the orthogonal transform, two-dimensional DCT is performed on each of the divided blocks for sequential storage into an 8.times.8 matrix. From the viewpoint of a two-dimensional plane, image data has spatial frequencies which are frequency information based on the distribution of light and shade information. Therefore, image data is converted by the DCT to a direct current component DC and alternating current components AC as shown in FIG. 25B. In the 8.times.8 matrix, data indicating the value of the direct current component DC is stored in the position of the origin ((0, 0) position), data indicating the highest frequency of the alternating current components AC in the horizontal direction is stored in the (0, 7) position, data indicating the highest frequency of the alternating current components AC in the vertical direction is stored in the (7, 0) position, and data indicating the highest frequency of the alternating current components AC in the oblique direction is stored in the (7, 7) position. In intermediate positions frequency data in the directions related to their coordinate positions are stored such that frequency components appear sequentially in the order of frequency beginning with the lowest at the origin.
Next, data stored in each of the coordinate positions in the matrix is divided by a corresponding one of quantization widths for frequency components, thereby performing linear quantization on each of the frequency components. Huffman coding, which is a type of variable-length coding, is performed on each of the quantized values. At this point, for the direct current component DC, a difference between direct current components of blocks near to each other is huffman-coded.
For alternating current components AC, a scan, which is referred to as a zigzag scan, is made from low- to high-frequency components and two-dimensional huffman coding of the number of successive invalid (0 in value) components (the number of runs of zeros) and the values of following effective components is performed.
In this method, the rate of compression is generally controlled by varying the quantization width. The higher the rate of compression, the larger the quantization width becomes and thus the larger the quantization error becomes. The deterioration of the quality of reproduced images becomes noticeable accordingly.
The quantization error of the transform coefficient tends to appear in a reproduced image as block distortion in which discontinuity occurs at the boundary between blocks. The block distortion is visually noticeable and thus a subjective impression of the image will be unfavorable even if the signal-to-noise ratio is good.
To remove the distortion, a method has been devised which applies low-pass filtering to an image signal reproduced by a decoder. The post-filtering can remove the distortion relatively well. However, if edges are contained in an image, they will be blurred. Conversely, when the degree of the lowpass filtering is lessened so as to reduce the blurring of the edges, the block distortion cannot be removed completely.
To solve such a problem, a method has been devised which detects the presence or absence of edges in an image and block distortion and applies lowpass filtering only to portions where there is distortion.
With the distortion removing method which applies filtering only to distorted portions, however, blurring still occurs in an image and the amount of block distortion must be calculated. This requires a long processing time, a circuit on a certain scale and power dissipation. For this reason, it is difficult to apply the distortion removal method to devices in which down-sizing and high-speed performance are taken seriously.